//
//  LYConfiguration.swift
//  RxSwift_Practice
//
//  Created by 李永彬 on 2020/4/28.
//  Copyright © 2020 李永彬. All rights reserved.
//

import Foundation
import CoreBluetooth

public class LYConfiguration {

    internal lazy var characteristicArray: [CBUUID] = {
        let array: [CBUUID] = [CBUUID.init(string: "8001"),CBUUID.init(string: "8002"),CBUUID.init(string: "8003"),CBUUID.init(string: "8004"),CBUUID.init(string: "2A37")]
        return array
    }()
    
    internal lazy var servicesArray: [CBUUID] = {
        let array: [CBUUID] = [CBUUID.init(string: "6006"),CBUUID.init(string: "7006"),CBUUID.init(string: "180D")]
        return array
    }()
    
    /// Data used to indicate that no more data is coming when communicating.
    public var endOfDataMark: Data

    /// Data used to indicate that a transfer was cancellen when communicating.
    public var dataCancelledMark: Data
    
    var _needToSend03EndCMD: Bool!
    var needToSend03EndCMD : Bool  {
        return _needToSend03EndCMD
    }

    // MARK: Initialization

    public init() {
        endOfDataMark = "EOD".data(using: String.Encoding.utf8)!
        dataCancelledMark = "COD".data(using: String.Encoding.utf8)!
        _needToSend03EndCMD = true
    }
}
